﻿using Harmontronics.Model.Common;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Harmontronics.Model.Entitys
{

    // 菜单表
    [Table("menu")]
    public class Menu
    {
        //id
        [Column("id")]
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }
        //parentId父级
        [Column("parentId")]
        public int? ParentId { get; set; }
        // 名称
        [Column("name" )]
        public string? Name { get; set; }
        //标签
        [Column("title" )]
        public string? Title { get; set; }
        // 项目中的页面路径
        [Column("path" )]
        public string? Path { get; set; }
        // 图标
        [Column("elIcon" )]
        public string? ElIcon { get; set; }
        // 路由地址
        [Column("url" )]
        public string? Url { get; set; }
        //菜单类型（C是菜单，M是目录）
        [Column("menuType" )]
        public string? MenuType { get; set; }
        //排序
        [Column("menuSort" )]
        public string? MenuSort { get; set; }
        //是否存活
        [Column("keepAlive")]
        public int KeepAlive { get; set; }

        //创建时间
        [Column("CreateTime")]
        public DateTime? CreateTime { get; set; }
        //更新时间
        [Column("updateTime")]
        [MaybeNull]
        public DateTime? UpdateTime { get; set; }
        //创建者id
        [Column("createBy" )]
        public string? CreateBy { get; set; }
        //更新人
        [Column("updateBy" )]
        public string? UpdateBy { get; set; }
        //是否启用
        [Column("enable")]
        public int? Enable { get; set; }

        [Column("redirect" )]
        public string? Redirect { get; set; }
        [Column("alwaysShow")]
        public int? AlwaysShow { get; set; }

    }
}
